package com.zide.framework.web.domain.vo.save;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Set;

/**
 * @author 石添
 * @date 2024/3/19 16:41
 */
@Schema(description = "入参 - 添加角色")
@Data
public class SysRoleSaveVO implements Serializable {

    private Long roleId;

    private String roleName;

    private String roleKey;

    private Integer roleSort;

    private String dataScope;

    private boolean menuCheckStrictly;

    private boolean deptCheckStrictly;

    private Integer status;

    private Long[] menuIds;

    private Long[] deptIds;

    private Set<String> permissions;

    public boolean isAdmin() {
        return isAdmin(this.roleId);
    }

    public static boolean isAdmin(Long roleId) {
        return roleId != null && 1L == roleId;
    }
}
